<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>jQuery validation plug-in - main demo</title>
	<script src="public/js/jquery-1.11.3.min.js"></script>
	<script src="public/js/jquery.validate.min.js"></script>
	<script>
	$.validator.setDefaults({
		submitHandler: function() {
			alert("submitted!");
		}
	});

	$().ready(function() {
		// validate the comment form when it is submitted
		$("#commentForm").validate();
	});
	</script>
</head>
<body>
<div id="main">
	<form id="commentForm">
		<input id="cname" name="name" minlength="2" type="text" required>
		<input class="submit" type="submit" value="Submit">
	</form>
</div>
</body>
</html>
